<?php
#发放锦鲤券给制定用户，无需领取
ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';


$uids = $argv[1] ?? '';

$uids = empty($uids) ? [] : explode(',', $uids);


if(empty($uids)){
    echo "请录入要发放锦鲤券的UID".PHP_EOL;
    exit;
}

$nResult = \Biz\service\springHomeDecActivity\LuckyCharmTicketService::giveLuckyTicketToUsers($uids);

var_dump(\Biz\model\springHomeDecActivity\LuckyCharmTicket::sqlLogs());

if(!$nResult){
    echo "赠送锦鲤券失败".PHP_EOL;
    exit;
}

echo "success".PHP_EOL;

exit;